{% extends 'host.html' %}
<!-- {% block style %}
<style >
   .mynav{
     margin-bottom:0!important
   }


</style>



{% endblock%} -->

{% block content%}

<header style="background:#EEEEEE; height:6rem;"> <div class="container"><h1>课程管理</h1></div></header><br>
<div class="container ">
<div class="btn-group">
    <button type="button" class="btn btn-primary">{{cla.name}}</button>
       <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">   <span class="caret"></span>
        <span class="sr-only">切换下拉菜单</span>
    </button>
    <ul class="dropdown-menu">
                        {% for user in users%}
                        <li>
                            <a href="/course/{{user.id}}">{{user.name}}</a>
                        </li>
                        {% endfor %}
                    
                </ul>
    </div>

  

  <!-- 表格 -->
    <a href="/accretion" type="button" class="btn btn-info glyphicon glyphicon-plus"  >  添加</a><br><br>
<table class="table table-bordered text-center">
  <thead style="background:#EEEEEE">
    <tr>
      <th class="text-center">课程名称</th>
      <th class="text-center">课程介绍</th>
      <th class="text-center">视频</th>
      <th class="text-center">编辑</th>
      <th class="text-center">删除</th>
    </tr>
  </thead>

  <tbody>
    <tr>
    {% for as in couses %}
      <td>{{as.title}}</td>
      <td>{{as.abstract}}</td>
      <td ><a href="/video/{{as.id}}"  class="glyphicon glyphicon-facetime-video"></a></td>
        <td><a class=" glyphicon glyphicon-edit" href="/revise/{{as.id}}"></a></td>
        <!-- 传的变量要加引号 -->
      <td><a class=" glyphicon glyphicon-trash"  href="#"  onclick="removemodal('{{as.id }}','{{as.title}}')"></a></td>
    </tr>
    </tbody>
    </div>

   
  
    {% endfor%}


<!-- 模态框 -->


<!-- 按钮触发模态框 -->
<!-- <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">开始演示模态框</button> -->
<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">是否确认删除</h4>
            </div>
            <div class="modal-body"></div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary  remove">确认删除</button>
            </div>
        </div>
    </div>
</div>



{% endblock %}

{% block script %}


<script type="text/javascript" src='/static/jspan.js'></script>
{% endblock %}